﻿@using DTcms.Common;
@{
    ViewBag.Title = "";
}
@model DTcms.Model.article_tags
@section HeaderContent{
    <script type="text/javascript" charset="utf-8" src="~/scripts/ueditor/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="~/scripts/ueditor/ueditor.all.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="~/scripts/ueditor/lang/zh-cn/zh-cn.js"></script>
}
<form id="form1" class="layui-form" url="TagsSave?action=@ViewBag.action&id=@ViewBag.id">
    @Html.AntiForgeryToken()
    <!--导航栏-->
    <div class="pageheader">
        <div class="page-bar">
            <ul class="page-breadcrumb">
                <li><a href="../channel/tags_list" class="back"><i class="fa fa-mail-reply-all"></i> 返回列表页</a></li>
                <li><a href="javascript:;"><i class="iconfont icon-home1"></i> 首页</a> </li>
                <li><a href="../channel/tags_list">标签管理</a> </li>
                <li><a href="javascript:;">编辑Tags标签</a> </li>
            </ul>
        </div>
    </div>
    <!--/导航栏-->
    <!--内容-->
    <div class="layui-fluid">
        <div class="layui-tab layui-tab-card">
            <ul class="layui-tab-title" id="floatHead">
                <li class="layui-this">Tags标签信息</li>
                <li>SEO优化</li>
            </ul>
            <div class="layui-tab-content">
                <div class="layui-tab-item layui-show">
                    <div class="layui-form-item">
                        <label class="layui-form-label">Tags标题</label>
                        <div class="layui-input-block">
                            @Html.TextBox("title", Model.title, new { @class = "input normal", datatype = "s2-100", sucmsg = " " })
                            <span class="Validform_checktip">*信息关联的关键字。</span>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">推荐显示</label>
                        <div class="layui-input-block">
                            @Html.CheckBox("is_red", Model.is_red == 1, new { title = "是" })
                            <span class="Validform_checktip">*是否推荐到标签列表页显示</span>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">排序数字</label>
                        <div class="layui-input-block">
                            @Html.TextBox("sort_id", Model.sort_id, new { @class = "input small", datatype = "n", sucmsg = " " })
                            <span class="Validform_checktip">*数字，越小越向前</span>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">介绍</label>
                        <div class="layui-input-block">
                            @Html.TextArea("content", Model.content, new { @style = "height:300px; width:100%;" })
                        </div>
                    </div>
                </div>
                <div class="layui-tab-item">
                    <div class="layui-form-item">
                        <label class="layui-form-label">调用别名</label>
                        <div class="layui-input-block">
                            @Html.TextBox("call_index", Model.call_index, new { @class = "input normal", datatype = @"/^\s*$|^[a-zA-Z0-9\-\_]{2,50}$/", sucmsg = " " })
                            <span class="Validform_checktip">*别名访问，非必填，不可重复</span>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">SEO标题</label>
                        <div class="layui-input-block">
                            @Html.TextBox("seo_title", Model.seo_title, new { @class = "input normal", datatype = "*0-100", sucmsg = " ", maxlength = "255" })
                            <span class="Validform_checktip">255个字符以内</span>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">SEO关健字</label>
                        <div class="layui-input-block">
                            @Html.TextArea("seo_keywords", Model.seo_keywords, new { @class = "input multiline", datatype = "*0-255", sucmsg = " " })
                            <span class="Validform_checktip">以“,”逗号区分开，255个字符以内</span>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">SEO描述</label>
                        <div class="layui-input-block">
                            @Html.TextArea("seo_description", Model.seo_description, new { @class = "input multiline", datatype = "*0-255", sucmsg = " " })
                            <span class="Validform_checktip">255个字符以内</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--/内容-->
    <!--工具栏-->
    <div class="page-footer">
        <div class="btn-wrap">
            <button class="layui-btn icon-btn" id="btnSubmit"><i class="layui-icon layui-icon-ok"></i>提交保存</button>
            <button class="layui-btn layui-btn-warm icon-btn" name="btnReturn" onclick="javascript:history.back(-1);"><i class="layui-icon layui-icon-return"></i>返回上一页</button>
        </div>
    </div>
    <!--/工具栏-->
</form>
@section Scripts{
    <script type="text/javascript">
        layui.use(['validform', 'element', 'jqueryform'], function () {
            //初始化表单验证
            $("#form1").initValidform('#btnSubmit', 1);

            //编辑器
            UE.getEditor("content");

            if ("@ViewBag.action" == "@DTEnums.ActionEnum.Edit.ToString()") {
                $("#call_index").attr("readonly", "readonly").focus();
            }
        });
    </script>
}